<div class="introduce">
	<div class="left">
		<div class="title">意见反馈</div>
		<div class="feedback">
			<div id="feedback_content" class="content text edit"></div>
			<div class="func">
				<input type="button" id="public_btn" class="btn btn_input" value="提交反馈" />
				<input type="text" id="code" class="code text" value="" />
				<img class="code_img" id="code_img" src="http://<?=HOST?>/auth/code/<?=time()?>" />
			</div>
		</div>
	</div>
	<div class="right">
	    <?php include PROJECT_PATH . 'Application/Web/View/Help/menu.tpl.php';?>
	</div>
</div>
<script src="<?=STATIC_PATH?>Js/nicedit/nicEdit.js" type="text/javascript"></script>
<script type="text/javascript">
	myEditor = new nicEditor({fullPanel : true});
    myEditor.addInstance('feedback_content');
    myEditor = myEditor.instanceById('feedback_content');
    myEditor.setContent("");
    $("#public_btn").click(function (){
    	$.ajax({
    	  url: "http://<?=HOST?>/help/feebackAjax",
    	  cache: false,
    	  timeout:10000,
    	  type: "POST",
    	  data: {
    		content:myEditor.getContent(),
    		code:$("#code").val()
    	  },
    	  dataType: "json",
    	  beforeSend: function() {
    		  disableHTML(true, '请稍等，提交中……', true);
    	  },
    	  success: function(data) {
      		  if(data.errCode == 0){
      			disableHTML(true, '提交成功，跳转中……', true);
      			setTimeout("self.location = 'http://<?=HOST?>/'",2000);
      		  }else{
      			disableHTML(true, data.errMsg, false);
  			    setTimeout(disableHTML,2000);
      			changeAuthCode("code_img");
      			$("#feedback_content").focus();
      		  }
    	  },
    		error:function(){
      			disableHTML(true, "请求出错，请重试", false);
      			setTimeout(disableHTML,2000);
      		}
    	});
    });
</script>
